
var ParseEnumType = function(){
	var enum_data={
			"comment-status": {"PENDING":"未处理","IN_PROGRESS":"处理中","PROCESSED":"已处理","CANCELED":"不处理"},
			"sex": {"F":"女","M":"男"}
		};
	var parseEnum = function(obj){
		if(!obj)
			return;
		var data_type = obj.attr("data-type");
		var data_value = obj.attr("data-value");
		obj.html(enum_data[data_type][data_value]);
	};
	
    return {
    	parse: function(){
    		$(".enum-type").each(function(){
    			parseEnum($(this));
    		});
    	}
    };
};

$(function(){
	new ParseEnumType().parse();
});

